﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B.S.BasicData.Infrastcuture.Interfaces
{
    /// <summary>
    /// 仓储接口
    /// </summary>
    /// <typeparam name="T">实体类</typeparam>
    public interface IBaseRepository<T> where T : class
    {
        
        /// <summary>
        /// 查询全部
        /// </summary>
        /// <returns>返回任务</returns>
        IQueryable<T> GetAll();

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns>返回任务</returns>
        Task<int> Add(T entity);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns>返回任务</returns>
        Task<int> Update(T entity);

    }
}
